interface LoadOptions {
    /**
     * The mode to load environment variables for.
     */
    mode?: string;
    /**
     * The path to the environment file. Defaults to `.env`.
     */
    path?: string;
    /**
     * Whether to overwrite existing environment variables.
     * Can be a boolean or an array of keys to overwrite.
     */
    overwrite?: boolean | string[];
}
type IsLeaf<T> = T extends {
    env: string;
} ? true : false;
type DotPaths<T> = T extends object ? IsLeaf<T> extends true ? never : {
    [K in keyof T & string]: IsLeaf<T[K]> extends true ? `${K}` : `${K}.${DotPaths<T[K]>}`;
}[keyof T & string] : never;
type ValueAtPath<T, P extends string> = P extends `${infer Key}.${infer Rest}` ? Key extends keyof T ? ValueAtPath<T[Key], Rest> : never : P extends keyof T ? IsLeaf<T[P]> extends true ? T[P] extends {
    env: infer E;
} ? E : never : never : never;
/**
 * Sometimes you need to store sensitive information, like API keys, database URLs, or Discord Credentials.
 *
 * ```ts
 * import { Env } from 'robo.js'
 *
 * Env.loadSync({ mode: 'dev' })
 * Env.data().NODE_ENV // 'development'
 * ```
 *
 * Use the `Env` class to load environment variables from a file and access them in a type-safe way.
 *
 * [**Learn more:** Environment Variables](https://robojs.dev/robojs/environment-variables)
 */
declare class Env<T> {
    private _variables;
    private static _data;
    /**
     * Creates a new instance of the Env class with the specified schema with type-checking and default values.
     *
     * ```ts
     * const env = new Env({
     * 	discord: {
     * 		clientId: { env: 'DISCORD_CLIENT_ID' }
     * 	},
     * 	example: {
     * 		default: 'This is an example',
     * 		env: 'EXAMPLE_ENV'
     * 	},
     * 	nodeEnv: { env: 'NODE_ENV' }
     * })
     *
     * // Returns the value of the DISCORD_CLIENT_ID environment variable
     * env.get('discord.clientId')
     * ```
     *
     * @param schema - The schema of environment variables to use for type-checking and default values.
     */
    constructor(schema: T);
    /**
     * Retrieves the value of the environment variable specified by the dot-separated key.
     * If the environment variable is not set, it returns the default value if provided.
     *
     * @param key - The dot-separated path to the environment variable in the schema.
     * @returns The value of the environment variable or its default.
     */
    get<K extends DotPaths<T>>(key: K): ValueAtPath<T, K>;
    /**
     * @returns The environment variables that have been loaded most recently.
     */
    static data(): Record<string, string>;
    /**
     * Loads environment variables from a file and applies them to the current process.
     *
     * @param options - Customize where the file path, mode, and overwrite behavior.
     * @returns Record object containing loaded environment variables.
     */
    static load(options?: LoadOptions): Promise<Record<string, string>>;
    /**
     * Loads environment variables from a file and applies them to the current process.
     *
     * **This operation is synchronous and will block the event loop.** Use {@link load} for asynchronous loading.
     *
     * @param options - Customize where the file path, mode, and overwrite behavior.
     * @returns Record object containing loaded environment variables.
     */
    static loadSync(options?: LoadOptions): Record<string, string>;
}
declare const env: Env<{
    discord: {
        clientId: {
            env: string;
        };
        debugChannelId: {
            env: string;
        };
        guildId: {
            env: string;
        };
        token: {
            env: string;
        };
    };
    nodeEnv: {
        env: string;
    };
    roboplay: {
        api: {
            env: string;
            default: string;
        };
        debug: {
            env: string;
        };
        env: {
            env: string;
        };
        frontend: {
            env: string;
            default: string;
        };
    };
}>;
declare function setGlobalOverwrites(overwrites: string[]): void;

export { Env, LoadOptions, env, setGlobalOverwrites };
